import { defineStore } from "pinia";
//要求
// pinia的数据模块命名，必须是useXxx
// defineStore的第一个参数，必须是独一无二的字符串
export const useCount = defineStore("count", {
  state: () => {
    return {
      num: 100,
    };
  },
  actions: {
    increment() {
      this.num++;
    },
  },
  // persist: true, //启用持久化存储
  persist: {
    key: "count-2303",
  },
});
